@extends('layouts.header')
@section('content')
	<h2>Welcome to {{ $topic->title }}!<h2>
	<h3>{{ $topic->description }}</h3>
	<h4>Subscribers: {{ $topic->subscriptions }}</h4>
	<h5>
		<a href="{{route('subscribe',['sub'=>$topic->title])}}">subscribe</a><br>
		<a href="{{ route('new_post',['sub'=>$topic->title])}}">Create new post</a>
	</h5>
	<br>
	<h2>Posts:</h2>
	@foreach ($posts as $post)
		<h3>{{$post->title}}</h3>
	@endforeach

@endsection()
